package com.divine.wn.car.service;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.divine.wn.car.persistence.LogMapper;
import com.divine.wn.car.vo.LogVO;

@Service
public class LogService {
	@Autowired
	private LogMapper logMapper;
	
	//@Transactional  在需要事务的时候加上这个标签。
	@Transactional
	public void insertLog(LogVO  logVO){
	     logVO.setLog_seq(logMapper.getLastSeq(logVO.getUser_tableid())+"");	
		 logMapper.insertLog(logVO);
	}
	public List<HashMap<String,Object>> getLogList(int id){
		return logMapper.getLogList(id);
	}

}
